package cn.iocoder.yudao.module.wine.api;

import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
import cn.iocoder.yudao.module.wine.api.dto.SupplyOrderDTO;
import cn.iocoder.yudao.module.wine.dal.dataobject.supplyorder.SupplyOrderDO;
import cn.iocoder.yudao.module.wine.service.supplyorder.SupplyOrderService;
import org.springframework.stereotype.Service;
import org.springframework.validation.annotation.Validated;

import javax.annotation.Resource;

/**
 * @author zyc
 * @createDate 2024/5/13 17:22
 */
@Service
@Validated
public class SupplyOrderApiImpl implements SupplyOrderApi{

    @Resource
    private SupplyOrderService supplyOrderService;


    @Override
    public SupplyOrderDTO getOrderById(Long orderId) {
        SupplyOrderDO supplyOrder = supplyOrderService.getSupplyOrder(orderId);
        return BeanUtils.toBean(supplyOrder,SupplyOrderDTO.class);
    }
}
